const { contextBridge, ipcRenderer } = require('electron')

contextBridge.exposeInMainWorld('main_API', {
    injectScript: () => ipcRenderer.invoke('inject-script'),
    injectStyle: () => ipcRenderer.invoke('inject-css'),
    injectLanguageFile: () => ipcRenderer.invoke('inject-LanguageFile'),
    getTourDates: () => ipcRenderer.invoke('get-tour-dates'),
    openListPage: () => ipcRenderer.send('open-list-page'),
    changeCurrentTourDataID: (id) => ipcRenderer.send('change-current-tour-data-id', id),
    openTotalMapPage: () => ipcRenderer.send('open-total-map-page'),
})